# the variable "destick_SRCS" contains all .cpp files of this project
set(destick_SRCS
	main.cpp
	destick.cpp
	destickui.cpp
	metronome.cpp
	
	# GUI files
	widgets/accentselect.cpp
	widgets/beatselect.cpp
	widgets/bpmedit.cpp
	widgets/bpmslider.cpp
	widgets/togglebutton.cpp
	widgets/volumeslider.cpp
	widgets/bpmtooltip.cpp
	
	# Beats
	beats/beat.cpp
	beats/beepbeat.cpp
	beats/sdlbeat.cpp
	
	# Visualizations
	visualizations/visualization.cpp
	visualizations/sinusvisualization.cpp	
)

# tell cmake to create .moc files for all files in the variable destick_SRCS that require such a file.
# note: this assumes that you use #include "header.moc" in your files
# also note that you don't actually require kde to use this command
kde3_automoc(${destick_SRCS})

# create an executable file named "destick" from the source files in the variable "destick_SRCS".
add_executable(destick ${destick_SRCS})

# link the "destick" target (i.e. the executable file added above) agains the Qt and the kdecore libraries.
target_link_libraries(destick SDL_mixer ${QT_AND_KDECORE_LIBRARIES} kdeui )

# Install the program.
install_targets(/bin destick)

# install the desktop file
install(FILES destick.desktop DESTINATION share/applications/kde)